*** Author: Jules Gazeaud
*** Date: August 15, 2023
*** Description: Master do-file

clear all
set more off
set maxvar 10000
set matsize 5000
cap version 15 
set seed 123456789

 

* SET DIRECTORY
global directory "[SET DIRECTORY HERE]"




* Subfolder globals
* -----------------

	global data				"${directory}/01_data"
	global figures			"${directory}/02_output/figures"
	global tables			"${directory}/02_output/tables"
	sysdir set PLUS 		"${directory}/ado"

	
* Stata tex
* -----------
do "${tables}/stata-tex.do"	


* Non-official commands 
* ------------------------	
local ssc_modules stddiff ranktest ivreg2
foreach module in `ssc_modules' {
capture which `module'
if _rc == 111 {
ssc install `module'
}
}


net install pdslasso, ///
	from("https://raw.githubusercontent.com/statalasso/pdslasso/master/pdslasso_v13") replace

net install lassopack, ///
	from("https://raw.githubusercontent.com/statalasso/lassopack/master/lassopack_v142") replace



* Globals
* --------------

global balance 			repondant_age_b secondary_b  origine_naissance_b married_b relation_head_b relation_spouse_b relation_daughter_b relation_other_b emploi_main_b initiatives_2_b formation_b ///
						hhsize_b children_b adults_b elderly_b conso_food_pc_b conso_nofood_pc_b conso_tot_pc_b dirtfloor_b thatched_still_b proprietaire_terre_b livestock_b /// 
						distance_cheflieu_b distance_marche_b distance_transpublic_b distance_ecoleprim_b distance_eau_b tclp


* Running the below do-file will create tables 1-3 in the published 
* paper and tables A2-A11 in the online appendix.
* --------------					
do "${directory}/analysis.do"					
